package Matches;

public class demo1 {
    public static void main(String[] args) {
        System.out.println("b".matches("[abc]"));
        System.out.println("a".matches("[^abc]"));
        System.out.println("zz".matches("[a-z]"));
        System.out.println("zz".matches("[a-zA-Z][a-zA-Z]"));
        System.out.println("a".matches("[a-zA-z]"));
        System.out.println("a".matches("[^a-zA-Z]"));
        System.out.println("b".matches("[[abc]&d]"));
        System.out.println("a".matches("\\d"));
        System.out.println("7".matches("\\d"));
        System.out.println("788".matches("\\d"));
        System.out.println("788".matches("\\d{2,}"));
        System.out.println("788".matches("\\d{5,}"));
        System.out.println("a".matches("\\S"));
        System.out.println("a".matches("\\s"));
        System.out.println("a".matches("\\w"));
        System.out.println("_".matches("\\w"));
        System.out.println("你是傻逼".matches("\\W{4,}"));
        System.out.println("你是傻逼".matches("\\W"));
    }
}
